package com.shenjinzheng.merchant.api;

import com.shenjinzheng.merchant.entity.Store;
import com.shenjinzheng.merchant.service.StoreService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/storeApi")
public class StoreApi {

    @Resource
    private StoreService storeService;

    @PostMapping
    public boolean saveStore(@RequestBody Store store) {
        storeService.save(store);
        return true;
    }

}
